import 'package:grocery_app_demo/api/entity/goods_list_res_entity.dart';
import 'package:grocery_app_demo/generated/json/base/json_convert_content.dart';

GoodsListResEntity $GoodsListResEntityFromJson(Map<String, dynamic> json) {
  final GoodsListResEntity goodsListResEntity = GoodsListResEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    goodsListResEntity.id = id;
  }
  final String? goodsCode = jsonConvert.convert<String>(json['goodsCode']);
  if (goodsCode != null) {
    goodsListResEntity.goodsCode = goodsCode;
  }
  final String? barRules = jsonConvert.convert<String>(json['barRules']);
  if (barRules != null) {
    goodsListResEntity.barRules = barRules;
  }
  final int? shipperId = jsonConvert.convert<int>(json['shipperId']);
  if (shipperId != null) {
    goodsListResEntity.shipperId = shipperId;
  }
  final String? shipperName = jsonConvert.convert<String>(json['shipperName']);
  if (shipperName != null) {
    goodsListResEntity.shipperName = shipperName;
  }
  final String? goodsName = jsonConvert.convert<String>(json['goodsName']);
  if (goodsName != null) {
    goodsListResEntity.goodsName = goodsName;
  }
  final bool? materialFlag = jsonConvert.convert<bool>(json['materialFlag']);
  if (materialFlag != null) {
    goodsListResEntity.materialFlag = materialFlag;
  }
  final String? vulgo = jsonConvert.convert<String>(json['vulgo']);
  if (vulgo != null) {
    goodsListResEntity.vulgo = vulgo;
  }
  final int? bigClassId = jsonConvert.convert<int>(json['bigClassId']);
  if (bigClassId != null) {
    goodsListResEntity.bigClassId = bigClassId;
  }
  final String? bigClassName =
      jsonConvert.convert<String>(json['bigClassName']);
  if (bigClassName != null) {
    goodsListResEntity.bigClassName = bigClassName;
  }
  final int? middleClassId = jsonConvert.convert<int>(json['middleClassId']);
  if (middleClassId != null) {
    goodsListResEntity.middleClassId = middleClassId;
  }
  final String? middleClassName =
      jsonConvert.convert<String>(json['middleClassName']);
  if (middleClassName != null) {
    goodsListResEntity.middleClassName = middleClassName;
  }
  final int? smallClassId = jsonConvert.convert<int>(json['smallClassId']);
  if (smallClassId != null) {
    goodsListResEntity.smallClassId = smallClassId;
  }
  final String? smallClassName =
      jsonConvert.convert<String>(json['smallClassName']);
  if (smallClassName != null) {
    goodsListResEntity.smallClassName = smallClassName;
  }
  final int? batchRulesId = jsonConvert.convert<int>(json['batchRulesId']);
  if (batchRulesId != null) {
    goodsListResEntity.batchRulesId = batchRulesId;
  }
  final String? tempName = jsonConvert.convert<String>(json['tempName']);
  if (tempName != null) {
    goodsListResEntity.tempName = tempName;
  }
  final String? pricingMode = jsonConvert.convert<String>(json['pricingMode']);
  if (pricingMode != null) {
    goodsListResEntity.pricingMode = pricingMode;
  }
  final double? standardWeight =
      jsonConvert.convert<double>(json['standardWeight']);
  if (standardWeight != null) {
    goodsListResEntity.standardWeight = standardWeight;
  }
  final String? unit = jsonConvert.convert<String>(json['unit']);
  if (unit != null) {
    goodsListResEntity.unit = unit;
  }
  return goodsListResEntity;
}

Map<String, dynamic> $GoodsListResEntityToJson(GoodsListResEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['goodsCode'] = entity.goodsCode;
  data['barRules'] = entity.barRules;
  data['shipperId'] = entity.shipperId;
  data['shipperName'] = entity.shipperName;
  data['goodsName'] = entity.goodsName;
  data['materialFlag'] = entity.materialFlag;
  data['vulgo'] = entity.vulgo;
  data['bigClassId'] = entity.bigClassId;
  data['bigClassName'] = entity.bigClassName;
  data['middleClassId'] = entity.middleClassId;
  data['middleClassName'] = entity.middleClassName;
  data['smallClassId'] = entity.smallClassId;
  data['smallClassName'] = entity.smallClassName;
  data['batchRulesId'] = entity.batchRulesId;
  data['tempName'] = entity.tempName;
  data['pricingMode'] = entity.pricingMode;
  data['standardWeight'] = entity.standardWeight;
  data['unit'] = entity.unit;
  return data;
}